<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="shortcut icon" href="/favicon.ico">
<meta name="viewport"
	content="initial-scale = 1.0, maximum-scale = 1.0, user-scalable = no, width = device-width">
<link rel="shortcut icon" href="favicon.ico">
<link href="/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
<link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="/common/css/monitor/index_server_info.css" rel="stylesheet" />
</head>
<style type="text/css">

</style>

<body style="background-color: #f3f3f4;">
	<div class="ibox float-e-margins">
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="example-wrap">
                        <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                             <form id="seachform"></form>
                        </div>
                        <table id="serverHistoryList">
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
	<!-- End Panel Other -->
	<script src="/js/jquery.min.js?v=2.1.4"></script>
	<script src="/js/bootstrap.min.js?v=3.3.5"></script>
	<script src="/js/content.min.js?v=1.0.0"></script>
	<script src="/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
	<script src="/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
	<script src="/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
	<script src="/common/petecat.js"></script>
	<script src="/common/form.js"></script>	
	<!-- HTML之间的传值 -->
	<script src="/js/jquery.params.js"></script>
	<script src="/js/plugins/layer-pc/layer.js"></script>
	<script src="/js/jquery.cookie.js"></script>
	<script src="/common/bootstrap-table-treetable.js"></script>
	<script src="/common/bootstrap-table.js"></script>
	<!-- 组件通用 -->
	<script src="/common/frame.js"></script>
	<script type="text/javascript">
	 	var serverMac = GetQueryString("serverMac");
		$(function() {	
			var table = {};
	    	table['id'] = 'serverHistoryList';
	    	table['url'] = BASE_URL+'/base/project/queryServerHistory',
	    	table['pagination'] = true,
	    	table['queryParams'] = function(params){
	    		var queryParams = queryBaseParams(params);
	            queryParams['serverMac'] = serverMac;
	            return queryParams;
	    	};
	    	table['columns'] = [{
		    	 field:'hostname',
		         title:'服务器名称'
				},{
		    	 field:'mac',
		         title:'服务器MAC地址'
			    },{
		    	 field:'sendTime',
		         title:'服务器开始时间',
	             formatter:function(value,row,index){
	            	 return timeTransfoTime(value+"000");
	             }
		    	},{
		    	 field:'stopTime',
		         title:'服务器结束时间',
	             formatter:function(value,row,index){
	            	 if(value != null){
	            		 return timeTransfoTime(value+"000");
	            	 }else{
	            		 return "服务器未关闭";
	            	 }
	             }
			    },{
		    	 field:'runTime',
		         title:'服务器运行时间'
			    },{
		    	 field:'token',
		         title:'服务器Token'
				},
			    {
		    	 field:'status',
		         title:'服务器状态',
	             formatter:function(value,row,index){
	            	 return value == 0 ?"<span style='color:red'>服务器停止运行</span>":"<span style='color:#00FF00'>服务器正在运行</span>";
	             }
				}];
	    	initTable(table);
		});
	</script>

</body>
</html>